<template>
  <el-menu :default-active="activeIndex" class="el-menu-demo home-header"
             mode="horizontal"
             @select="handleSelect"
             background-color="#545c64"
             text-color="#fff"
             active-text-color="#ffd04b">
    <div class="title"><i class="fa fa-pie-chart"></i>天源报表查询平台</div>
    <el-menu-item index="1">
        <router-link to="/">
          <div>
            <i class="fa fa-bar-chart"></i>每日报表
          </div>
        </router-link>
    </el-menu-item>
    <el-menu-item index="2">
        <router-link to="month">
          <div>
            <i class="fa fa-area-chart"></i>月度报表
          </div>
        </router-link>
    </el-menu-item>
    <el-menu-item index="3">
      <router-link to="bug">
        <div>
          <i class="fa fa-bug"></i>款式疵点
        </div>
      </router-link>
    </el-menu-item>
    <el-menu-item index="4">
      <router-link to="wft">
        <div>
          <i class="fa fa-tag"></i>款式WFT
        </div>
      </router-link>
    </el-menu-item>
    <el-menu-item index="5">
      <router-link to="people">
        <div>
          <i class="fa fa-group"></i>员工质量
        </div>
      </router-link>
    </el-menu-item>
    <el-menu-item index="6">
      <router-link to="system">
        <div>
          <i class="fa fa-gear"></i>系统配置
        </div>
      </router-link>
    </el-menu-item>
  </el-menu>
</template>

<script>
export default {
  name: 'CommonHeader',
  data () {
    return {
      activeIndex: '1'
    }
  },
  methods: {
    handleSelect (key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>

<style scoped lang="stylus">
  .home-header
    .title
      float: left;
      padding: 0px 20px;
      background-color: rgb(255, 208, 75);
      border-bottom-right-radius: 30px;
      font-size: 20px;
      color: #fff;
    .el-menu-item
      i
        margin-right: 5px;
</style>
